#!/bin/bash
CURDIR=`pwd`
DEST=doc/javadoc-latest-release
TARFILE=javadocarchive.tgz
ant doc
svn rm --force "$DEST"
svn ci "$DEST" -m "Removing old stuff for the new release javadocs"
rm -f $TARFILE &>/dev/null
pushd doc/javadoc
tar zcvf "$CURDIR"/$TARFILE --exclude='.svn' *
popd
mkdir "$DEST"
pushd "$DEST"
tar xvf "$CURDIR"/$TARFILE
popd
svn add --force "$DEST"
find "$DEST" -name "*.html" | xargs -n 1 svn propset svn:mime-type text/html
find "$DEST" -name "*.css" | xargs -n 1 svn propset svn:mime-type text/css
find "$DEST" -name "*.gif" | xargs -n 1 svn propset svn:mime-type image/gif
svn ci "$DEST" -m "Adding the new release javadoc files"
rm -f $TARFILE &>/dev/null

